/**
* @file main.cpp
* Includes the startup function main(). 
*
* @mainpage OffView
*
* This is the source code documentation for our project OffView generated 
* with Doxygen.<br /> You can find the OffView project page at Google Code 
* <a href="http://code.google.com/p/offview/">here</a>.
*/

#include <QtCore>
#include <QtGui>
#include <QtOpenGL>

#include "MainWindow.h"

/**
* @brief Creates our QApplication object and its main window
* Before creating our main window we check first if the current system has
* OpenGl support, if not, terminate the application with an error message.
* 
* @param argc Number of arguments
* @param argv Argument vector
* 
* @todo Add application icon
* @todo Load all languages
* @todo Select most fitting language for the current computer
*/
int main(int argc, char** argv)
{
	QApplication app(argc, argv);
	
	if(!QGLFormat::hasOpenGL()) {
		QMessageBox::critical(
			0, QApplication::tr("Warning"),
			QApplication::tr("This system has no OpenGl support!")
		);
		return -1;
	}
	
	QTranslator translator;
	app.installTranslator(&translator);

	MainWindow window;
	window.show();
	
	return app.exec();
}
